package com.eric.controller;


import cn.dev33.satoken.util.SaResult;
import com.eric.domain.dto.EquipmentDTO;
import com.eric.service.IEquipmentService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 设备库存表 前端控制器
 * </p>
 *
 * @author eric
 * @since 2024-12-21
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/equipment")
public class EquipmentController {

    private final IEquipmentService equipmentService;

    @GetMapping("/all")
    public SaResult getAllByPage(Integer current, Integer pageSize){
        return equipmentService.getAllByPageService(current,pageSize);
    }

    @GetMapping("/{id}")
public SaResult getOneById(@PathVariable("id")Integer id){
        return equipmentService.getOneByIdService(id);
    }




}
